package com.example.mcpweather.tool;

import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class McpDemoTool {
    @Tool(name="searchGoods",description = "搜索商品价格")
    public String search(@ToolParam(description = "商品",required = true)String goods){
        log.info("查询商品 = {}",goods);
        return "五毛钱";
    }
}
